<?php
require_once "Mail.php";
require_once 'Mail/mimeDecode.php';
$from = "info@rockedge.org";
$to = "dad@rockedge.org";
$subject = "Test PEAR Mail";
$body = "System\n\nPEAR Mail";

$host = "mail.rockedge.org";
$username = "info@rockedge.org";
$password = "keelwater";

$headers = array ('From' => $from,
  'To' => $to,
  'Subject' => $subject);
$smtp = Mail::factory('smtp',
  array ('host' => $host,
    'auth' => true,
    'username' => $username,
    'password' => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
  echo("<p>" . $mail->getMessage() . "</p>");
 } else {
  echo("<p>Message successfully sent!</p>");
 }
?>    
